<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 86188
  Date: 2022/6/8
  Time: 13:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>登录</title>
</head>
<body>
<%--理论上说， 在发送数据之前，应该由 前端 进行验证数据（密码加密、非空判断）--%>
<form action="<c:url value="/login"/>" method="post">
    <div>
        <input type="text" name="userName" placeholder="请输入用户名">
    </div>
    <div>
        <input type="password" name="password" placeholder="请输入密码">
    </div>
    <div>
        <input type="text" name="code" placeholder="请输入验证码" >
        <img src="<c:url value="/validCode"/>" style="width: 180px ; height: 50px" >
    </div>
    <div>
        <button type="submit" class="btn btn-primary">提交</button>
    </div>
    <div>
        <button type="submit" class="btn btn-primary">取消</button>
    </div>
</form>
<a href="register.jsp" role="button">注册</a>
<h1 style="color:red;">${massage}</h1>
</body>
</html>
